package cn.com.dycc.party_org.member.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import cn.com.dycc.common.entity.Party_Org_MemberPart;
import cn.com.dycc.party_org.member.entity.Member;
import cn.com.dycc.party_org.member.entity.UserAndMember;
import cn.com.dycc.party_org.member.entity.UserChildAndMember;
import cn.com.dycc.party_org.member.param.FindMemberParam;
import cn.com.dycc.party_org.member.param.MemberParam;
import cn.com.dycc.party_org.organize.entity.BasicUserMation;



/**
 * 
 * Description: 党员信息dao层
 * Author: Liket
 * Version: 1.0
 * Create Date Time: 2018年6月20日 上午10:01:45.
 * Update Date Time: 
 * @see
 */
@Repository("memberDao")
public interface MemberDao {
	int addMember(MemberParam member);
	int deleteMember(Member member);
	int deleteAllMember(String user_ids[]);
	int updateMember(Member member);
	public Member findMember(MemberParam param);
	
	UserChildAndMember findMemberByUserId(MemberParam param);
	//查询所有党员信息
	List<UserAndMember> findAllMember(FindMemberParam param);
	List<UserChildAndMember> findAllMemberByParam(FindMemberParam param);
	
	
	
	String findAllMemberCount(FindMemberParam param);
	String findAllMemberCountByParam(FindMemberParam param);
	
	//List<Member> findMemberBy();
	
	//linfangan 根据党组织id查询是否还存在党员
	public int findCountByDeptId(@Param("org_id") String org_id,@Param("dept_id") String dept_id);

	// 根据党组织id查询党员基本信息 
	public List<BasicUserMation> findMemBerByOrganize(@Param("org_id") String org_id,@Param("dept_id") String dept_id);
	
	//根据用户id查询关联到党组织id和党组织名称  linfa
	public Map<String,Object> findDeptPartyByUserId(@Param("org_id") String org_id,@Param("user_id") String user_id);
	
	String countMonth(String org_id);
	String countAll(String org_id);
	
	/**
	 * 根据用户id或者用户姓名查询党员基本信息
	 * @param user_id 用户id
	 * @param user_name 用户姓名
	 * @return
	 * @author gaofan
	 */
	public List<Party_Org_MemberPart> findMemBerByIdOrName(@Param("user_id") String user_id,@Param("user_name") String user_name);


}
